//
//  ScanPersonViewController.h
//  MyProject
//
//  Created by Pei on 16/8/9.
//  Copyright © 2016年 Xiaobo Pei. All rights reserved.
//

#import "JackBaseViewController.h"

#import <AVFoundation/AVFoundation.h>

@protocol ScanPersonViewControllerDelegate <NSObject>

- (void)passScanPersonValue:(NSArray*)tempData;

@end

@interface ScanPersonViewController : JackBaseViewController<AVCaptureMetadataOutputObjectsDelegate>
{
    BOOL torchFlag;
    
    /// add AVCaptureVideo
    int num;
    BOOL upOrdown;
    NSTimer * timer;
    BOOL _running;
    
    NSString *typeStr;
}

@property (weak,nonatomic) id<ScanPersonViewControllerDelegate> delegate;

@property (strong, nonatomic) NSString *typeStr;

/// add AVCaptureVideo
@property (strong,nonatomic) AVCaptureDevice * device;
@property (strong,nonatomic) AVCaptureDeviceInput * input;
@property (strong,nonatomic) AVCaptureMetadataOutput * output;
@property (strong,nonatomic) AVCaptureSession * session;
@property (strong,nonatomic) AVCaptureVideoPreviewLayer * preview;
@property (strong,nonatomic) UIImageView * line;

@end
